package com.example.fastshareapp;

import java.util.ArrayList;
import java.util.List;

import org.alljoyn.bus.annotation.Position;
import org.alljoyn.bus.annotation.Signature;

public class PackageDetail {
	@Position(0)
	@Signature("s")
	public String m_id;
	@Position(1)
	@Signature("as")
	public String[] m_listId;
	@Position(2)
	@Signature("i")
	public int m_numPackage;
	@Position(3)
	@Signature("s")
	public String m_description;
	@Position(4)
	@Signature("s")
	public String m_type;
	@Position(5)
	@Signature("s")
	public String m_status;

	public synchronized void createPackageDetail(List<Package> list) {
		int count = 0 ;
		m_listId = new String[list.size()];
		for (Package pac : list) {
			m_listId[count] = pac.m_id;
			count++;
		}
		m_numPackage = m_listId.length;
	}
	public synchronized void createPackageDetail(Package pac) {
		m_listId = new String[1];
		m_listId[0] = pac.m_id;
		m_numPackage = m_listId.length;
	}

}
